/**   
 * @Title: MainActivityHealthFileFragment.java 
 * @Package cn.edu.cdtu.healthclient.activity.fragment 
 * @Description: TODO 
 * @author 
 * @date 
 * @version V0.0   
 */
package cn.edu.cdtu.healthclient.activity.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import cn.edu.cdtu.healthclient.activity.HealthFileBodyActivity;
import cn.edu.cdtu.healthclient.activity.HealthFileMentalActivity;
import cn.edu.scu.healthclient.activity.R;

/** 
 * @ClassName: MainActivityHealthFileFragment 
 * @Description: TODO
 * @author 
 * @date 
 *  
 */
public class MainActivityHealthFileFragment extends Fragment {

	private TextView topTitle;
	private ImageView btn_healthFileBody;
	private ImageView btn_healthFileMental;
	/* (non-Javadoc)
	 * <p>Title: onActivityCreated</p> 
	 * <p>Description: </p> 
	 * @param savedInstanceState 
	 * @see android.support.v4.app.Fragment#onActivityCreated(android.os.Bundle)
	 */
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
		topTitle = (TextView) getView().findViewById(R.id.topTitle);  
	    topTitle.setText("健康档案");
	
	}

	/* (non-Javadoc)
	 * <p>Title: onCreateView</p> 
	 * <p>Description: </p> 
	 * @param inflater
	 * @param container
	 * @param savedInstanceState
	 * @return 
	 * @see android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
	 */
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View rootView = inflater.inflate(R.layout.activity_main_healthfile_fragment, container, false);
		
	    btn_healthFileBody = (ImageView) rootView.findViewById(R.id.healthFile_body);
	    btn_healthFileMental = (ImageView) rootView.findViewById(R.id.healthFile_mental);
	    btn_healthFileBody.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getActivity(), HealthFileBodyActivity.class);
				startActivity(intent);
			}
		});
	    btn_healthFileMental.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(getActivity(), HealthFileMentalActivity.class);
				startActivity(intent);
			}
		});
	    
		return   rootView;
	}
	
	

}
